Month to Date

Returns a set of members from the same level as the given member (siblings), beginning with the first sibling member and ending with the given member, constrained by the Month level in the Time dimension.

Syntax & Usage

MTD(<model member> [,<integer value>])

<model member>

A PQL expression that returns a single member element. The member must exist in the data source; it cannot be a custom member. For the MTD function, this should be a member from the dateKey hierarchy; the given member will be the last date in the list.

<integer value>

A numeric value that determines which day of the given month the list should start from. By default, this is set to 1; it can be changed from the Insert Arguments window.

Example

  • The resulting set will include a list of dates from the start of the given month, up to and including the selected date
  • The start date is set to 1 (the first day of the month) by default. To change the start date, change the <integer value> from the Insert Arguments panel, or from Script Mode

MTD([data].[dateKey].[2008-03-24],1)